package com.example.demo;

import jakarta.annotation.PostConstruct;
import jakarta.annotation.Resource;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Service;

@Service
@EnableConfigurationProperties(MailProperties.class)
public class Service1 {
    @Resource
    private MailProperties mailProperties;

    @PostConstruct
    public void sendMail() {
        System.out.println(mailProperties.getHost());;
    }
}
